﻿using System;

namespace Ganss.Excel.Tests.Data
{
    class ProductDynamic
    {
        public string Name { get; set; }
        public int Number { get; set; }
        public decimal Price { get; set; }
        public bool Offer { get; set; }
        public DateTime OfferEnd { get; set; }
        public double Value { get; set; }

        public override bool Equals(object obj)
        {
            return obj is ProductDynamic dynamic &&
                   Name == dynamic.Name &&
                   Number == dynamic.Number &&
                   Price == dynamic.Price &&
                   Offer == dynamic.Offer &&
                   OfferEnd == dynamic.OfferEnd &&
                   Value == dynamic.Value;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(Name, Number, Price, Offer, OfferEnd, Value);
        }
    }
}